package com.atguigu.guilimall.search.vo;

import com.atguigu.common.to.es.SkuEsModel;
import com.google.common.collect.Lists;
import lombok.Data;

import java.util.List;

/**
 * @DESCRIPTION: 查询结果返回对象
 * @author: zr
 * @DATE: 2022/12/18 17:11
 */
@Data
public class SearchResultVo {
    /**
     * 查询到的商品信息
     */
    private List<SkuEsModel> products;
    /**
     * 当前页码
     */
    private Integer pageNum;
    /**
     * 总记录数
     */
    private Long total;
    /**
     * 总页码
     */
    private Integer totalPages;
    /**
     * 导航页码
     */
    private List<Integer> pageNavs;
    /**
     * 结果所涉及到的品牌
     */
    private List<BrandVo> brandVos;
    /**
     * 所涉及到的属性
     */
    private List<AttrVo> attrVos;
    /**
     * 所涉及到的所有分类
     */
    private List<CatalogVo> catalogVos;
    /**
     * 面包屑导航数据
     */
    private List<NavVo> navs = Lists.newArrayList();
    private List<Long> attrIds = Lists.newArrayList();

    @Data
    public static class NavVo {
        private String navName;
        private String navValue;
        private String link;
    }

    @Data
    public static class BrandVo {
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    public static class CatalogVo {
        /**
         * 分类ID
         */
        private Long catalogId;
        /**
         * 分类名
         */
        private String catalogName;
    }

    @Data
    public static class AttrVo {
        private Long attrId;
        private String attrName;
        private List<String> attrValue;
    }
}
